package com.lxk.mall.pms.domain.bo.statics;

import com.lxk.mall.pms.domain.PmsProductStatistics;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品统计业务对象 pms_product_statistics
 *
 * @author Lion Li
 * @date 2024-06-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PmsProductStatistics.class, reverseConvertGenerate = false)
public class PmsProductStatisticsBo extends BaseEntity {

    /**
     * 编号，主键自增
     */
    @NotNull(message = "编号，主键自增不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 商户id
     */
    private Long merId;

    /**
     * 统计日期
     */
    @NotNull(message = "统计日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date time;

    /**
     * 商品 SPU 编号
     */
    @NotNull(message = "商品 SPU 编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long spuId;

    /**
     * 浏览量
     */
    @NotNull(message = "浏览量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long browseCount;

    /**
     * 访客量
     */
    @NotNull(message = "访客量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long browseUserCount;

    /**
     * 收藏数量
     */
    @NotNull(message = "收藏数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long favoriteCount;

    /**
     * 加购数量
     */
    @NotNull(message = "加购数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long cartCount;

    /**
     * 下单件数
     */
    @NotNull(message = "下单件数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderCount;

    /**
     * 支付件数
     */
    @NotNull(message = "支付件数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderPayCount;

    /**
     * 支付金额
     */
    @NotNull(message = "支付金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal orderPayPrice;

    /**
     * 退款件数
     */
    @NotNull(message = "退款件数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long afterSaleCount;

    /**
     * 退款金额
     */
    @NotNull(message = "退款金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal afterSaleRefundPrice;

    /**
     * 访客支付转化率（百分比）
     */
    @NotNull(message = "访客支付转化率（百分比）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long browseConvertPercent;


}
